(function(){"use strict";BX.namespace("BX.Landing.UI.Tool");function n(){return new BX.PopupWindow("action_dialog_"+ +new Date,null,{titleBar:BX.Landing.Loc.getMessage("LANDING_ACTION_DIALOG_TITLE"),overlay:.5})}function t(n,t){return new BX.PopupWindowButton({id:"action_dialog_confirm",className:"popup-window-button-accept",text:n||BX.Landing.Loc.getMessage("LANDING_ACTION_DIALOG_CONFIRM_BUTTON"),events:{click:t}})}function o(n,t){return new BX.PopupWindowButtonLink({id:"action_dialog_cancel",text:n||BX.Landing.Loc.getMessage("LANDING_ACTION_DIALOG_CANCEL_BUTTON"),events:{click:t}})}BX.Landing.UI.Tool.ActionDialog=function(){this.popup=n();this.popup.popupContainer.classList.add("landing-ui-dialog-action")};BX.Landing.UI.Tool.ActionDialog.instance=null;BX.Landing.UI.Tool.ActionDialog.getInstance=function(){if(!BX.Landing.UI.Tool.ActionDialog.instance){BX.Landing.UI.Tool.ActionDialog.instance=new BX.Landing.UI.Tool.ActionDialog}return BX.Landing.UI.Tool.ActionDialog.instance};BX.Landing.UI.Tool.ActionDialog.prototype={show:function(n){n=typeof n==="object"?n:{};n.title=n.title||BX.Landing.Loc.getMessage("LANDING_ACTION_DIALOG_TITLE");n.content=n.content||BX.Landing.Loc.getMessage("LANDING_ACTION_DIALOG_CONTENT");if(BX.type.isNotEmptyString(n.content)){n.content=BX.create("div",{props:{className:"landing-ui-dialog-action-content"},html:n.content})}else if(BX.type.isDomNode(n.content)){n.content.style.display=null;n.content=BX.create("div",{props:{className:"landing-ui-dialog-action-content"},children:[n.content]})}this.popup.setTitleBar(n.title);this.popup.setContent(n.content);return new Promise(function(i,e){this.popup.setButtons([t(n.confirm,function(){i();this.close()}.bind(this)),n.type!=="alert"?o(n.cancel,function(){e();this.close()}.bind(this)):""]);this.popup.show()}.bind(this))},close:function(){this.popup.close()}}})();
//# sourceMappingURL=action_dialog.map.js